<phone:PhoneApplicationPage
    x:Class="LyonMag.postforum"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls.LocalizedResources;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0,0,0,0" Background="#AD1F15" Orientation="Horizontal">
            <Image x:Name="imgLogo" Source="Assets/Licons/navBar.png" Margin="-100,0,0,0"></Image>
            <Button Content="Deconnexion" x:Name="btnLogout" Background="Gray" Width="180" FontSize="20" Visibility="Collapsed" Margin="-300,0,0,0" Foreground="White" Click="btnLogout_Click"></Button>
        </StackPanel>
        
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="300"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <TextBlock Text="créer un sujet sur le forum" Foreground="Black" Margin="10,0,0,0"></TextBlock>
                <StackPanel Orientation="Horizontal">
                    <telerik:RadTextBox Watermark="Saisissez un titre..." Width="350" Height="80" x:Name="txtSubject" BorderBrush="Orange"></telerik:RadTextBox>
                    
                    <Button Content="Envoyer" Foreground="Black" Background="Gray" x:Name="btnSubmit" Click="btnSubmit_Click" Height="80" Margin="0,0,0,0"></Button>
                </StackPanel>
                <telerik:RadTextBox Watermark="Saisissez votre message.." Height="140" BorderBrush="Orange" x:Name="txtTitle" Width="350" Margin="-130,0,0,0"></telerik:RadTextBox>
                
            </StackPanel>
        </Grid>
        <Popup x:Name="popAlert" Margin="35,100,0,0" Grid.Row="2">
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <StackPanel Background="Gray">
                    <TextBlock Width="400" TextWrapping="Wrap" Margin="10,0,10,0" Text="Votre compte a bien été créé. " HorizontalAlignment="Center"></TextBlock>
                    <TextBlock Width="400" TextWrapping="Wrap" Margin="10,0,10,0" Text="Pour vous déconnecter ,  il vous suffit de cliquer sur le boutton déconnexion .  Si vous voulez par la suite vous reconnecter ,   veuillez entre votre pseudo lors de l'envoie d'un commentaire."></TextBlock>
                    <Button Content="Fermer" x:Name="btnCLosein" Click="btnCLosein_Click"></Button>
                </StackPanel>
            </Border>
        </Popup>
        <Popup x:Name="poplogout" Margin="20,260,0,0" Grid.Row="2">
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <StackPanel Background="Gray">
                    <TextBlock Margin="10,0,10,0" Width="400"  Text="Vous êtes maintenant déconnecté. " HorizontalAlignment="Center" TextWrapping="Wrap"></TextBlock>
                    <TextBlock Height="3"></TextBlock>
                    <TextBlock TextWrapping="Wrap" Margin="10,0,10,0" Width="400" Text="Pour poster des commentaires avec votre compte,saisissez votre pseudo lors de l'envoi"></TextBlock>
                    <Button Content="Fermer" x:Name="popafterlogout" Click="popafterlogout_Click"></Button>
                </StackPanel>
            </Border>
        </Popup>
        <!--pop without text-->
        <Popup Grid.Row="2" x:Name="blank" Margin="40,150,0,0">
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <StackPanel Background="Gray">
                    <TextBlock Margin="10,0,10,0" Text="Vous devez saisir un titre et un message !"></TextBlock>
                    <Button x:Name="btnpopupforblank" Content="fermer" Click="btnpopupforblank_Click"></Button>
                </StackPanel>
            </Border>
        </Popup>
        <!--register initiate-->
     
        <!--pop nick Name-->
        <Popup x:Name="popNickName" Grid.Row="1" VerticalAlignment="Center" Width="800" Margin="40,-300,0,0" >
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <StackPanel
                Orientation="Vertical" Background="Gray" Width="400">
                    <StackPanel>
                        <TextBlock Text="Saississez votre pseudo" HorizontalAlignment="Center"></TextBlock>
                    </StackPanel>
                    <StackPanel>
                        <TextBox x:Name="txtNickName"></TextBox>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <Button x:Name="btnEnter" Content="Envoyer" Click="btnEnter_Click"></Button>
                        <Button x:Name="btnCancel" Content="Annuler" Click="btnCancel_Click"></Button>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Popup>
        <Popup x:Name="popSubmit" Grid.Row="1" Margin="40,300,0,0" >
            <Border CornerRadius="2" BorderBrush="Gray" BorderThickness="5">
                <StackPanel Background="Gray" Width="400">
                    <StackPanel>
                        <TextBlock Margin="10,0,10,0" Width="400"  Text="Le commentaire a bien été  ajouté  ! " TextWrapping="Wrap"></TextBlock>
                        <TextBlock Height="2"></TextBlock>
                        <TextBlock Margin="0,0,10,0" Width="400" TextWrapping="Wrap" Text="  Il apparaitra en ligne dés sa validation par un administrateur ."></TextBlock>
                        <TextBlock Text="" Height="2" HorizontalAlignment="Center"></TextBlock>
                        <TextBlock Margin="10,0,10,0" Text=" Ce pseudo est disponible, voulez-vous le réserver ?" TextWrapping="Wrap"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <Button Content="Reserver " x:Name="btnLogin" Click="btnLogin_Click"></Button>
                        <Button Content="Non Merci" x:Name="btnTryAgain" Click="btnTryAgain_Click"></Button>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Popup>
        <Popup x:Name="popSecondsss" Grid.Row="2" Margin="50,250,0,0">
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <StackPanel Background="Gray" Width="400">
                    <TextBlock Margin="10,0,10,0" Text="Le nouveau sujet de discussion  a bien été  ajouté  ! " Width="400" TextWrapping="Wrap">
                     
                    </TextBlock>
                    <TextBlock  Margin="10,0,10,0" Width="400" TextWrapping="Wrap" Text="Il apparaitra  en ligne dés sa validation par un administrateur."></TextBlock>
                    <Button Content="Fermer" x:Name="btnCloseSecond" Click="btnCloseSecond_Click"></Button>
                </StackPanel>
            </Border>
        </Popup>

        <Popup x:Name="popRigister" Margin="50,00,0,0" Grid.Row="1">
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="400" Background="Gray">
                    <StackPanel>
                        <StackPanel>
                            <TextBlock Text="Inscription" HorizontalAlignment="Center"></TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <TextBlock Text="Pseudo" Margin="10,0,0,0"></TextBlock>
                            <TextBox  x:Name="txtUserName"></TextBox>
                        </StackPanel>
                        <StackPanel>
                            <TextBlock Text="Email" Margin="10,0,0,0"></TextBlock>
                            <TextBox x:Name="txtEmail"></TextBox>
                        </StackPanel>
                        <StackPanel>
                            <TextBlock Text="Mot de passe" Margin="10,0,0,0"></TextBlock>
                            <PasswordBox x:Name="txtPasswor"></PasswordBox>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <Button Content="Reserver" x:Name="btnRegister" Width="200" Click="btnRegister_Click"></Button>
                            <Button Content="Annuler" x:Name="btnCamcelRegister" Width="200" Click="btnCamcelRegister_Click"></Button>
                        </StackPanel>

                    </StackPanel>
                </Grid>
            </Border>
        </Popup>
        <Popup x:Name="popLogins" VerticalAlignment="Center" Grid.Row="1" Margin="50,-140,0,0">
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <StackPanel Background="Gray">
                    <StackPanel>
                        <TextBlock Text="Ce nom d'utilisateur est réservé ou incorrect. " Width="300" TextWrapping="Wrap"></TextBlock>
                        <TextBlock Text="Connectez-vous s'il s'agit du votre." Margin="10,0,10,0"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <Button x:Name="btnLoginnew" Click="btnLoginnew_Click" Content="Se connecter"></Button>
                        <Button x:Name="btnTrynew" Click="btnTrynew_Click" Content="Réessayer"></Button>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Popup>
        <Popup x:Name="popEMail" Margin="150,150,40,0" Grid.Row="2">
            <Border BorderBrush="Gray" BorderThickness="8" CornerRadius="10">
                <StackPanel Background="Gray" HorizontalAlignment="Center">
                    <TextBlock Text="Cet email est incorrect"></TextBlock>
                    <Button Content="Fermer" x:Name="popValidEmail" Click="popValidEmail_Click"></Button>
                </StackPanel>
            </Border>
        </Popup>

        <Popup x:Name="popLoginFailed">
            <StackPanel Background="Black" Opacity="0.8"  HorizontalAlignment="Center" Width="400" Margin="60,400,0,0">
                <TextBlock Text="Pseudo ou mot de passe non valide!" HorizontalAlignment="Center"></TextBlock>
                <Button Width="200" HorizontalAlignment="Center" Content="Fermer" x:Name="btnFermerloginfailed" Click="btnFermerloginfailed_Click"></Button>
            </StackPanel>
        </Popup>
        <Popup x:Name="popLogin" Margin="50,200,0,0" Grid.Row="1">
            <Border  CornerRadius="10" BorderBrush="Gray" BorderThickness="5">
                <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="400" Background="Gray">
                    <StackPanel>
                        <StackPanel>
                            <TextBlock Text="Connexion" HorizontalAlignment="Center"></TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <TextBlock Margin="10,0,10,0" Text="Pseudo"></TextBlock>
                            <TextBox x:Name="txtUsernamePassword"></TextBox>
                        </StackPanel>
                        <StackPanel>
                            <TextBlock Margin="10,0,10,0" Text="Mot de passe"></TextBlock>
                            <PasswordBox x:Name="txtPasswordPassword"></PasswordBox>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <Button Content="OK" x:Name="btnLoginUser" Width="200" Click="btnLoginUser_Click"></Button>
                            <Button Content="Annuler" x:Name="btnLoginCancel" Width="200" Click="btnLoginCancel_Click"></Button>
                        </StackPanel>

                    </StackPanel>
                </Grid>
            </Border>
        </Popup>
    </Grid>

</phone:PhoneApplicationPage>